package apitest;

/**
 * @Author liuhaoqi
 * @Date 2021/1/5 22:22
 * @Version 1.0
 */
public class Biantaitiaotaijie {
    public static void main(String[] args) {
        System.out.println(JumpFloorII(3));
    }
    public static int JumpFloorII(int n) {
        if(n == 0 || n == 1) return 1;
        int[] dp = new int[n+1];
        dp[0] = 1;
        dp[1] = 1;
        for(int i = 2; i<=n; i++){
            dp[i] = 2*dp[i-1];
        }
        return dp[n];
    }
}
